<?php

namespace App\Models;

use App\Library\Models\Entity;
use App\Library\Traits\Orm\ShopProductOrmTrait;
use Illuminate\Database\Eloquent\SoftDeletes;

class ShopProductModel extends Entity
{
    use SoftDeletes, ShopProductOrmTrait;

    protected $table = 'shop_product';
    
    protected $primaryKey = 'product_id';
    
    protected $casts = ['main_img_ids' => 'json', 'desc_img_ids' => 'json', 'spec_json' => 'json'];

    protected $fillable = [
        'product_id',
        'serial_number',
        'user_id',
        'product_status',
        'product_is_delete',
        'product_name',
        'product_category_id_1',
        'product_category_id_2',
        'product_category_id_3',
        'product_stock_empty',
        'product_deposit_status',
        'product_deposit_type',
        'product_activity',
        'product_activity_type',
        'product_brand',
        'add_user_id',
        'edit_user_id',
        'sort',
        'product_avatar',
        'product_avatar_img_id_json',
        'product_protect',
        'product_wild_care',
        'is_agent',
        'is_help',
        'product_stage',
        'product_gene',
        'product_label',
        'product_online_time',
        'product_offline_time',
        'product_effective_day',
        'product_effective_time',
        'product_special_start_time',
        'product_special_end_time',
        'product_hits',
        'product_total_sell',
        'product_note',
        'product_feed_hd_id',
        'product_guide_hd_id',
        'product_tool_effect',
        'product_tool_species',
        'product_tool_stage',
        'product_content',
        'product_content_img_id_json',
        'status_recommend',
        'sub_price',
        'min_price',
        'max_price',
        'is_commission',
        'product_pet_code',
        'main_img_ids',
        'desc_img_ids',
        'video_id',
        'ps_id_json',
        'spec_json',
        'sales',
        'buy_will',
        'plug',
        'plug2',
        'publish_at',
        'created_time',
        'operated_at',
        'add_at',
        'created_at',
        'updated_at',
        'deleted_at'
    ];
}
